 var table ,form ,laypage ,layer ,element ,laydate ,upload;//时间组件
$(function(){ 
	
	layui.use(['table','form','laypage','layer', 'element', 'laydate','upload'], function(){
		 table = layui.table;
		 form=layui.form;
		 laypage = layui.laypage ;//分页
		 layer = layui.layer ;//弹层
		 element = layui.element; //元素操作
		 laydate = layui.laydate; //时间组件 
		 upload = layui.upload;
		 
	
	})
})
function getheaderFUN(){
	    var urlFLG=getQueryString("flg");
		var slehtn='';
		$.ajax({
		        url:'/res/page/equipment/date/header1.html',
		        type:'get',
		        async:false,
		        dataType : "html",
		        success:function(data){       	        	
		        	 var wrappedObj = $("<code></code>").append($(data));
		        	 slehtn=$(wrappedObj).find("#form_zzdata").html();		        	
		        	 $("#headerDIV").append(slehtn);
		        
		        	 var sunhtml=$("#headerDIV").find(".ARRY").find("a");
		             for(var i=0;i<$(sunhtml).length;i++){
		     			var flgname=$(sunhtml).eq(i).attr("flg");
		     			if(urlFLG==flgname){//选中得
		     				var className=$(sunhtml).eq(i).attr("class");
		     				console.log(className)
		     				$(sunhtml).eq(i).attr('class',className+'_this');
		     				
		     			}else{
		     				
		     			}
		     		}
		        }
		  })	
}
function js_method(e){
	var url=$(e).attr("Rurl");
	var urlflg=$(e).attr("flg");
	var TarGet=$(e).attr("target");
	var newURL="";
	if(/[?]/.test(url)){//判断是否有传参
		newURL=url+"&flg="+urlflg;
	    //其它代码
	}else if(url==""){
		return false;
	}else{
		newURL=url+"?flg="+urlflg;
	}
	if(TarGet=="_blank"){//新窗口
		 window.open(newURL)
	}else{
		window.location.href=newURL;
	}		
}